// 云函数入口文件
const cloud = require('wx-server-sdk')
const CreditRecord=wx.cloud.database().collection('CreditRecord')
cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
    CreditRecord.where({_openid:event.a})
    .get().then(res=>{
        console.log(res.data)
    })

    return {
        event,
        openid: wxContext.OPENID,
        appid: wxContext.APPID,
        unionid: wxContext.UNIONID,
    }
}